﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BolaoDNA.Services;
using BolaoDNA.DomainModel;
using Web.Generics;

namespace BolaoDNA.WebMvc.Controllers
{
    [HandleError]
    [Authorize]
    public class HomeController : Controller
    {

        public HomeController()
        {

        }

        private readonly BolaoService bolaoService;
        public HomeController(BolaoService bolaoService)
        {
            this.bolaoService = bolaoService;
        }

        public ActionResult Index()
        {
            ViewData["Message"] = "Bem Vindo ao Bolao DNA";
            ViewData["BolaoList"] = bolaoService.Select();
            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
